using System;
using System.Collections.Generic;
using System.Text;
using XnaDevRu.Bullet;
using XnaDevRu.Bullet.Dynamics;
using Microsoft.Xna.Framework;

namespace BulletDemo1
{
	public class World : DiscreteDynamicsWorld
	{
		/// <summary>
		/// Constructor
		/// </summary>
		public World()
			: base( new CollisionDispatcher(), new SimpleBroadphase(), new SequentialImpulseConstraintSolver() )
		{
			CollisionDispatcher dispatcher = Dispatcher as CollisionDispatcher;

			dispatcher.registerCollisionCreateFunc( BroadphaseNativeTypes.Sphere, BroadphaseNativeTypes.Sphere,
				new SphereSphereCollisionAlgorithm.CreateFunc() );

/*			SphereBoxCollisionAlgorithm.CreateFunc sphereBox = new SphereBoxCollisionAlgorithm.CreateFunc();
			SphereBoxCollisionAlgorithm.CreateFunc boxSphere = new SphereBoxCollisionAlgorithm.CreateFunc();
			boxSphere.IsSwapped = true;

			dispatcher.registerCollisionCreateFunc( BroadphaseNativeTypes..Sphere, BroadphaseNativeTypes.Box,
				sphereBox );

			dispatcher.registerCollisionCreateFunc( BroadphaseNativeTypes.Box, BroadphaseNativeTypes.Sphere,
				boxSphere );*/
		}

/*		private static OverlappingPairCache CreateBroadphase()
		{
			Vector3 worldAabbMin = new Vector3( -10000, -10000, -10000 );
			Vector3 worldAabbMax = new Vector3( 10000, 10000, 10000 );
			const int maxProxies = 32766;

			return new AxisSweep3( worldAabbMin, worldAabbMax, maxProxies );
		}*/
	}
}